Integrand size = 25, antiderivative size = 75 \[ \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {x}{b}+\frac {2 \sqrt {a^2-b^2} \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a b d}-\frac {\text {arctanh}(\cos (c+d x))}{a d} \]
-x/b-arctanh(cos(d*x+c))/a/d+2*arctan((b+a*tan(1/2*d*x+1/2*c))/(a^2-b^2)^( 1/2))*(a^2-b^2)^(1/2)/a/b/d
Time = 0.21 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.20 \[ \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {a c+a d x-2 \sqrt {a^2-b^2} \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )+b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{a b d} \]
-((a*c + a*d*x - 2*Sqrt[a^2 - b^2]*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^ 2 - b^2]] + b*Log[Cos[(c + d*x)/2]] - b*Log[Sin[(c + d*x)/2]])/(a*b*d))
Time = 0.50 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.16, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {3042, 3368, 3042, 3537, 3042, 3139, 1083, 217, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2}{\sin (c+d x) (a+b \sin (c+d x))}dx\) |
\(\Big \downarrow \) 3368 |
\(\displaystyle \int \frac {\left (1-\sin ^2(c+d x)\right ) \csc (c+d x)}{a+b \sin (c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1-\sin (c+d x)^2}{\sin (c+d x) (a+b \sin (c+d x))}dx\) |
\(\Big \downarrow \) 3537 |
\(\displaystyle \left (\frac {a}{b}-\frac {b}{a}\right ) \int \frac {1}{a+b \sin (c+d x)}dx+\frac {\int \csc (c+d x)dx}{a}-\frac {x}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \left (\frac {a}{b}-\frac {b}{a}\right ) \int \frac {1}{a+b \sin (c+d x)}dx+\frac {\int \csc (c+d x)dx}{a}-\frac {x}{b}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {2 \left (\frac {a}{b}-\frac {b}{a}\right ) \int \frac {1}{a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a}d\tan \left (\frac {1}{2} (c+d x)\right )}{d}+\frac {\int \csc (c+d x)dx}{a}-\frac {x}{b}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle -\frac {4 \left (\frac {a}{b}-\frac {b}{a}\right ) \int \frac {1}{-\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )^2-4 \left (a^2-b^2\right )}d\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {\int \csc (c+d x)dx}{a}-\frac {x}{b}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\int \csc (c+d x)dx}{a}+\frac {2 \left (\frac {a}{b}-\frac {b}{a}\right ) \arctan \left (\frac {2 a \tan \left (\frac {1}{2} (c+d x)\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{d \sqrt {a^2-b^2}}-\frac {x}{b}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {2 \left (\frac {a}{b}-\frac {b}{a}\right ) \arctan \left (\frac {2 a \tan \left (\frac {1}{2} (c+d x)\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{d \sqrt {a^2-b^2}}-\frac {\text {arctanh}(\cos (c+d x))}{a d}-\frac {x}{b}\) |
-(x/b) + (2*(a/b - b/a)*ArcTan[(2*b + 2*a*Tan[(c + d*x)/2])/(2*Sqrt[a^2 - b^2])])/(Sqrt[a^2 - b^2]*d) - ArcTanh[Cos[c + d*x]]/(a*d)
3.4.28.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[cos[(e_.) + (f_.)*(x_)]^2*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x])^m*(1 - Sin[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, m, n }, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || IntegersQ[2*m, 2*n])
Int[((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2)/(((a_) + (b_.)*sin[(e_.) + (f _.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[C*(x /(b*d)), x] + (Simp[(A*b^2 + a^2*C)/(b*(b*c - a*d)) Int[1/(a + b*Sin[e + f*x]), x], x] - Simp[(c^2*C + A*d^2)/(d*(b*c - a*d)) Int[1/(c + d*Sin[e + f*x]), x], x]) /; FreeQ[{a, b, c, d, e, f, A, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.27 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.25
method | result | size |
derivativedivides | \(\frac {-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b}+\frac {\left (2 a^{2}-2 b^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{a b \sqrt {a^{2}-b^{2}}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{d}\) | \(94\) |
default | \(\frac {-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b}+\frac {\left (2 a^{2}-2 b^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{a b \sqrt {a^{2}-b^{2}}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{d}\) | \(94\) |
risch | \(-\frac {x}{b}+\frac {i \sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \left (a +\sqrt {a^{2}-b^{2}}\right )}{b}\right )}{d b a}-\frac {i \sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i \left (-a +\sqrt {a^{2}-b^{2}}\right )}{b}\right )}{d b a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d a}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d a}\) | \(155\) |
1/d*(-2/b*arctan(tan(1/2*d*x+1/2*c))+(2*a^2-2*b^2)/a/b/(a^2-b^2)^(1/2)*arc tan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))+1/a*ln(tan(1/2*d*x+1 /2*c)))
Time = 0.33 (sec) , antiderivative size = 262, normalized size of antiderivative = 3.49 \[ \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\left [-\frac {2 \, a d x + b \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - b \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - \sqrt {-a^{2} + b^{2}} \log \left (-\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} - 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right )}{2 \, a b d}, -\frac {2 \, a d x + b \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - b \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right )}{2 \, a b d}\right ] \]
[-1/2*(2*a*d*x + b*log(1/2*cos(d*x + c) + 1/2) - b*log(-1/2*cos(d*x + c) + 1/2) - sqrt(-a^2 + b^2)*log(-((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d* x + c) - a^2 - b^2 - 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*x + c))*sqrt (-a^2 + b^2))/(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)))/(a*b *d), -1/2*(2*a*d*x + b*log(1/2*cos(d*x + c) + 1/2) - b*log(-1/2*cos(d*x + c) + 1/2) + 2*sqrt(a^2 - b^2)*arctan(-(a*sin(d*x + c) + b)/(sqrt(a^2 - b^2 )*cos(d*x + c))))/(a*b*d)]
\[ \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\int \frac {\cos {\left (c + d x \right )} \cot {\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.41 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.25 \[ \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {\frac {d x + c}{b} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} - \frac {2 \, {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )} \sqrt {a^{2} - b^{2}}}{a b}}{d} \]
-((d*x + c)/b - log(abs(tan(1/2*d*x + 1/2*c)))/a - 2*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*d*x + 1/2*c) + b)/sqrt(a^2 - b^2)) )*sqrt(a^2 - b^2)/(a*b))/d
Time = 6.88 (sec) , antiderivative size = 896, normalized size of antiderivative = 11.95 \[ \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\text {Too large to display} \]
log(tan(c/2 + (d*x)/2))/(a*d) + (2*atan((64*a^3)/(64*a^2*b - 64*b^3 + 64*a ^3*tan(c/2 + (d*x)/2) - 64*a*b^2*tan(c/2 + (d*x)/2)) - (64*a*b^2)/(64*a^2* b - 64*b^3 + 64*a^3*tan(c/2 + (d*x)/2) - 64*a*b^2*tan(c/2 + (d*x)/2)) + (6 4*b^3*tan(c/2 + (d*x)/2))/(64*a^2*b - 64*b^3 + 64*a^3*tan(c/2 + (d*x)/2) - 64*a*b^2*tan(c/2 + (d*x)/2)) - (64*a^2*b*tan(c/2 + (d*x)/2))/(64*a^2*b - 64*b^3 + 64*a^3*tan(c/2 + (d*x)/2) - 64*a*b^2*tan(c/2 + (d*x)/2))))/(b*d) - (2*atanh((64*a^2*(b^2 - a^2)^(1/2))/(256*a^2*b - 768*b^3 + (512*b^5)/a^2 - 64*a^3*tan(c/2 + (d*x)/2) + 832*a*b^2*tan(c/2 + (d*x)/2) - (1792*b^4*ta n(c/2 + (d*x)/2))/a + (1024*b^6*tan(c/2 + (d*x)/2))/a^3) - (512*b^2*(b^2 - a^2)^(1/2))/(256*a^2*b - 768*b^3 + (512*b^5)/a^2 - 64*a^3*tan(c/2 + (d*x) /2) + 832*a*b^2*tan(c/2 + (d*x)/2) - (1792*b^4*tan(c/2 + (d*x)/2))/a + (10 24*b^6*tan(c/2 + (d*x)/2))/a^3) + (512*b^4*(b^2 - a^2)^(1/2))/(256*a^4*b + 512*b^5 - 768*a^2*b^3 - 64*a^5*tan(c/2 + (d*x)/2) - 1792*a*b^4*tan(c/2 + (d*x)/2) + 832*a^3*b^2*tan(c/2 + (d*x)/2) + (1024*b^6*tan(c/2 + (d*x)/2))/ a) - (1280*b^3*tan(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2))/(256*a^3*b - 768*a*b^ 3 + (512*b^5)/a - 64*a^4*tan(c/2 + (d*x)/2) - 1792*b^4*tan(c/2 + (d*x)/2) + 832*a^2*b^2*tan(c/2 + (d*x)/2) + (1024*b^6*tan(c/2 + (d*x)/2))/a^2) + (1 024*b^5*tan(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2))/(512*a*b^5 + 256*a^5*b - 768 *a^3*b^3 - 64*a^6*tan(c/2 + (d*x)/2) + 1024*b^6*tan(c/2 + (d*x)/2) - 1792* a^2*b^4*tan(c/2 + (d*x)/2) + 832*a^4*b^2*tan(c/2 + (d*x)/2)) + (320*a*b...